package com.siyu.preplan.planpcondition.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.siyu.preplan.planpcondition.mapper.PlanPConditionMapper;
import com.siyu.preplan.planpcondition.domain.PlanPCondition;
import com.siyu.preplan.planpcondition.service.IPlanPConditionService;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.siyu.preplan.planpcondition.mapper.PlanPConditionMapper;
import com.siyu.preplan.planpcondition.domain.PlanPCondition;
import com.siyu.preplan.planpcondition.service.IPlanPConditionService;

/**
 * 预案触发条件Service业务层处理
 *
 * @author hrhy
 * @date 2024-06-15
 */
@Service
public class PlanPConditionServiceImpl extends ServiceImpl<PlanPConditionMapper, PlanPCondition> implements IPlanPConditionService
{
    @Autowired
    private PlanPConditionMapper planPConditionMapper;

    /**
     * 查询预案触发条件
     *
     * @param id 预案触发条件主键
     * @return 预案触发条件
     */
    @Override
    public PlanPCondition selectPlanPConditionById(String id)
    {
        return planPConditionMapper.selectPlanPConditionById(id);
    }

    /**
     * 查询预案触发条件列表
     *
     * @param planPCondition 预案触发条件
     * @return 预案触发条件
     */
    @Override
    public List<PlanPCondition> selectPlanPConditionList(PlanPCondition planPCondition)
    {
        return planPConditionMapper.selectPlanPConditionList(planPCondition);
    }

    /**
     * 新增预案触发条件
     *
     * @param planPCondition 预案触发条件
     * @return 结果
     */
    @Override
    public int insertPlanPCondition(PlanPCondition planPCondition)
    {
            return planPConditionMapper.insertPlanPCondition(planPCondition);
    }

    /**
     * 修改预案触发条件
     *
     * @param planPCondition 预案触发条件
     * @return 结果
     */
    @Override
    public int updatePlanPCondition(PlanPCondition planPCondition)
    {
        return planPConditionMapper.updatePlanPCondition(planPCondition);
    }

    /**
     * 批量删除预案触发条件
     *
     * @param ids 需要删除的预案触发条件主键
     * @return 结果
     */
    @Override
    public int deletePlanPConditionByIds(String[] ids)
    {
        return planPConditionMapper.deletePlanPConditionByIds(ids);
    }

    /**
     * 删除预案触发条件信息
     *
     * @param id 预案触发条件主键
     * @return 结果
     */
    @Override
    public int deletePlanPConditionById(String id)
    {
        return planPConditionMapper.deletePlanPConditionById(id);
    }
}


